package com.emm.yixun.mobile.ui

import android.os.Bundle
import com.emm.yixun.mobile.R
import com.emm.yixun.mobile.base.BaseActivity
import com.emm.yixun.mobile.fragment.CustomerFragment
import kotlinx.android.synthetic.main.main_head_title.*
import me.imid.swipebacklayout.lib.app.SwipeBackActivity

class CustomerListActivity : SwipeBackActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_customer_list)

        init()
    }

    private fun init() {
        BaseActivity.activity = this
        SetSwipeBackLayout(null)
        SetRelativiLayoutPadding(R.id.main_head_top_rela)
        title_main.text = "选择用户"
        back_btn.setOnClickListener { finish() }
        supportFragmentManager.beginTransaction()
                .replace(R.id.content, CustomerFragment().apply {
                    arguments = Bundle().apply { putBoolean(CustomerFragment.IS_SELECT, true) }
                })
                .commit()
    }
}
